Dynomotion

Group: DynoMotion Message: 7236 From: daves3891 Date: 4/11/2013
Subject: Dual loop questions
I am almost finished programming my GUI and then the real fun real begin of hooking it up to the machine.

The machine has some old tech servo drives with 16' heidenhain scales and is driven with rack / pinion.

Currently this is controlled with a galil card in dual loop mode driving the amplifiers in torque mode.

The other option on the drive is speed/velocity mode which would mean that with that set I would only need one channel to drive the dual encoder combo.

I think I would like to try to use 2 channels per axis.
I guess I would connect the motor encoder to one channel and set the P, D settings and then connect the scale to another channel and give it most of the I settings?
How can combine the outputs from these 2 channels to a single (+-10volt) motor torque command?

The reason for this is the drives do not have good tuning software like the kflop.

Is there any examples of this being done already?

I would also like to implement a position/encoder safety system that would compare both encoder counts and if they differ from a set range (eg. a connection loss or problem with encoder) then the system will shut down.
I think that this would just be a simple C program that keeps monitoring the channel positions, scales them, and compares the error.

Let me know if that sounds like it would work.




Thanks
Dave
Group: DynoMotion Message: 7242 From: TK Date: 4/12/2013
Subject: Re: Dual loop questions
Hi Dave,

It should work. But to do dual loop dual encoders with KFLOP it requires using two axis channels per motor. You must tie the two loops together with a C Program.  Start with the inner loop first and get that working (rotary encoder). 

You you can write a watchdog loop to compare the encoders if that makes sense.  

Regards
TK

On Apr 11, 2013, at 7:13 PM, "daves3891" <fahque99@...> wrote:

 

I am almost finished programming my GUI and then the real fun real begin of hooking it up to the machine.

The machine has some old tech servo drives with 16' heidenhain scales and is driven with rack / pinion.

Currently this is controlled with a galil card in dual loop mode driving the amplifiers in torque mode.

The other option on the drive is speed/velocity mode which would mean that with that set I would only need one channel to drive the dual encoder combo.

I think I would like to try to use 2 channels per axis.
I guess I would connect the motor encoder to one channel and set the P, D settings and then connect the scale to another channel and give it most of the I settings?
How can combine the outputs from these 2 channels to a single (+-10volt) motor torque command?

The reason for this is the drives do not have good tuning software like the kflop.

Is there any examples of this being done already?

I would also like to implement a position/encoder safety system that would compare both encoder counts and if they differ from a set range (eg. a connection loss or problem with encoder) then the system will shut down.
I think that this would just be a simple C program that keeps monitoring the channel positions, scales them, and compares the error.

Let me know if that sounds like it would work.

Thanks
Dave

Group: DynoMotion Message: 7244 From: daves3891 Date: 4/12/2013
Subject: Re: Dual loop questions
Thanks


How are the loops tied together in a C program?
Is there any example code?


The watchdog makes sense


Thanks
Dave

--- In DynoMotion@yahoogroups.com, TK <tk@...> wrote:
>
> Hi Dave,
>
> It should work. But to do dual loop dual encoders with KFLOP it requires using two axis channels per motor. You must tie the two loops together with a C Program. Start with the inner loop first and get that working (rotary encoder).
>
> You you can write a watchdog loop to compare the encoders if that makes sense.
>
> Regards
> TK
>
> On Apr 11, 2013, at 7:13 PM, "daves3891" <fahque99@...> wrote:
>
> > I am almost finished programming my GUI and then the real fun real begin of hooking it up to the machine.
> >
> > The machine has some old tech servo drives with 16' heidenhain scales and is driven with rack / pinion.
> >
> > Currently this is controlled with a galil card in dual loop mode driving the amplifiers in torque mode.
> >
> > The other option on the drive is speed/velocity mode which would mean that with that set I would only need one channel to drive the dual encoder combo.
> >
> > I think I would like to try to use 2 channels per axis.
> > I guess I would connect the motor encoder to one channel and set the P, D settings and then connect the scale to another channel and give it most of the I settings?
> > How can combine the outputs from these 2 channels to a single (+-10volt) motor torque command?
> >
> > The reason for this is the drives do not have good tuning software like the kflop.
> >
> > Is there any examples of this being done already?
> >
> > I would also like to implement a position/encoder safety system that would compare both encoder counts and if they differ from a set range (eg. a connection loss or problem with encoder) then the system will shut down.
> > I think that this would just be a simple C program that keeps monitoring the channel positions, scales them, and compares the error.
> >
> > Let me know if that sounds like it would work.
> >
> > Thanks
> > Dave
> >
> >
>
Group: DynoMotion Message: 7289 From: daves3891 Date: 4/18/2013
Subject: Re: Dual loop questions
Can you provide an example of the dual loop C program?


Thanks
Dave

--- In DynoMotion@yahoogroups.com, TK <tk@...> wrote:
>
> Hi Dave,
>
> It should work. But to do dual loop dual encoders with KFLOP it requires using two axis channels per motor. You must tie the two loops together with a C Program. Start with the inner loop first and get that working (rotary encoder).
>
> You you can write a watchdog loop to compare the encoders if that makes sense.
>
> Regards
> TK
>
> On Apr 11, 2013, at 7:13 PM, "daves3891" <fahque99@...> wrote:
>
> > I am almost finished programming my GUI and then the real fun real begin of hooking it up to the machine.
> >
> > The machine has some old tech servo drives with 16' heidenhain scales and is driven with rack / pinion.
> >
> > Currently this is controlled with a galil card in dual loop mode driving the amplifiers in torque mode.
> >
> > The other option on the drive is speed/velocity mode which would mean that with that set I would only need one channel to drive the dual encoder combo.
> >
> > I think I would like to try to use 2 channels per axis.
> > I guess I would connect the motor encoder to one channel and set the P, D settings and then connect the scale to another channel and give it most of the I settings?
> > How can combine the outputs from these 2 channels to a single (+-10volt) motor torque command?
> >
> > The reason for this is the drives do not have good tuning software like the kflop.
> >
> > Is there any examples of this being done already?
> >
> > I would also like to implement a position/encoder safety system that would compare both encoder counts and if they differ from a set range (eg. a connection loss or problem with encoder) then the system will shut down.
> > I think that this would just be a simple C program that keeps monitoring the channel positions, scales them, and compares the error.
> >
> > Let me know if that sounds like it would work.
> >
> > Thanks
> > Dave
> >
> >
>
Group: DynoMotion Message: 7290 From: Tom Kerekes Date: 4/18/2013
Subject: Re: Dual loop questions
Hi Dave,

for (;;)  // loop forever
{
    WaitNextTimeSlice();
    ch1->Dest += ch0->Output;  // Move chan1 at a rate of chan0's Output
}

Regards
TK